package zuoye.chengji;

public class StudentTest {
    public static void main(String[] args) {

        Student[] s=new Student[5];
        s[0]=new Student("12344","小明","男",20,90);
        s[1]=new Student("12345", "小华","男",20,87);
        s[2]=new Student("12346", "小东","女",20,89);
        s[3]=new Student("12347", "小北","女",21,88);
        s[4]=new Student("12348","小南","男",21,91);
        System.out.println("学生信息：");
        int min=s[0].getsJava();
        int max=s[0].getsJava();
        int sum=0;
        for(int i=0;i<s.length;i++){
            if(s[i].getsJava()<min){
                min=s[i].getsJava();
            }
            if(s[i].getsJava()>max){
                max=s[i].getsJava();
            }sum+=s[i].getsJava();
            System.out.println("学号："+s[i].getsNo()+",姓名："+s[i].getsName()+",性别："+s[i].getsSex()+",年龄："+s[i].getsAge()+",java成绩："+s[i].getsJava());
        }
        System.out.println("最低成绩："+min+",最高成绩:"+max+",平均成绩："+sum/s.length);
    }
}